package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.ZjAccount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 账号表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2023-07-18
 */
@Repository
public interface ZjAccountMapper extends BaseMapper<ZjAccount> {

    /**
     * 根据手机号查询是否已经存在
     * @param phone 手机号
     * @return
     */
    Integer existByPhone(String phone);

    /**
     * 根据手机号查询
     * @param phone 手机号
     * @return
     */
    ZjAccount getByPhone(String phone);

    /**
     * 根据手机号或账号查询
     * @param phone 手机号或账号
     * @return
     */
    ZjAccount getByPhoneOrAccount(String phone);

}
